namespace game {
    export namespace tween {

        /**
         * Q弹效果
         */
        export class Scale {

            /***
             * 基础的Q弹效果
             * @param {cc.Node} node
             * @param {number} smallScaleX
             * @param {number} smallScaleY
             * @param {number} bigScaleX
             * @param {number} bigScaleY
             * @param {number} time
             * @param {number} timeGap
             * @param {number} timeGapRandom
             */
            public static bigSmall(node:cc.Node,small = 0.88, big = 1.12, time = 0.4, timeGap = 0.5, timeGapRandom = 0.5):void {
                lib.Tween.to(node,time,{scale:big},{scale:small}).delay(timeGap+timeGapRandom*Math.random()).
                to(time , {scale:small}).timeLine.setLoop(1000000000);
            }

            public static shake(node:cc.Node,rotation=10,time=0.1,timeGap=1,timeGapRandom=1):void {
                lib.Tween.to(node,time,{rotation:rotation}).delay(timeGap + timeGapRandom*Math.random()).to(time*2,{rotation:-rotation}).to(time,{rotation:rotation*0.5}).timeLine.setLoop(100000000);
            }
        }
    }
}